package com.cloudsigns.factorymanager2.engineering.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.cloudsigns.factorymanager2.BaseActivity;
import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.project.activity.AddProductInfomationActivity1;
import com.cloudsigns.factorymanager2.project.utils.ConstantUtil;

public class DispatchEditEngineeringPublicationOrderActivity extends BaseActivity {
    private View rl_back;
    private TextView tv_title;
    private ImageView img_add_product;

    @Override
    protected void onBaseCreate(Bundle savedInstanceState) {
        setContentView(R.layout.layout_edit_engineering_publication_dispatch);
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        rl_back = findViewById(R.id.rl_back);
        tv_title = findViewById(R.id.tv_title);
        img_add_product = findViewById(R.id.img_add_product);
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        tv_title.setText("广告上刊");
    }

    @Override
    public void setListener() {
        rl_back.setOnClickListener(this);
        img_add_product.setOnClickListener(this);
    }

    @Override
    public void widgetClick(View v) {
        Intent mIntent;
        switch (v.getId()) {
            // 返回
            case R.id.rl_back:
                finish();
                break;
            // 产品信息
            case R.id.img_add_product:
                mIntent = new Intent(DispatchEditEngineeringPublicationOrderActivity.this, AddProductInfomationActivity1.class);
                mIntent.putExtra("type", "engineeringInstall");
                startActivityForResult(mIntent, ConstantUtil.ADD_PRODUCT_INFOMATION);
                break;
        }
    }
}
